import React from 'react'
import {TwsReactMarkdownPreview} from 'tws-antd'

const OnlineCodingAnswer = ({onlineCodingQuiz, isStudent, getAnswerFile}) => {
  return (<div>
    <div className='margin-t-3'>
      <h3>作业答案</h3>
      <div className='margin-t-2'>
        {isStudent ? <a onClick={getAnswerFile}>作业答案下载</a> : ''}
      </div>
      <div className='margin-t-2 mark-down-wrap'>
        <TwsReactMarkdownPreview source={onlineCodingQuiz.answerDescription} />
      </div>
    </div>
    <div className='margin-t-3'>
      <h3>作业内容</h3>
      <div className='margin-t-2 mark-down-wrap'>
        <TwsReactMarkdownPreview source={onlineCodingQuiz.description} />

      </div>
    </div>
  </div>)
}

export default OnlineCodingAnswer
